﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using Citi.FinancePlanningAnalysis.Domain;
using System.IO;

namespace Citi.FinancePlanningAnalysis.SchedulerUi
{
    public class FDLAccountImport : GeneralImport
    {
        public override string ExcelPath { get { return ConfigurationManager.AppSettings["FDLAccountExcelPath"]; } }
        public override List<string> Files { get; set; }
        public override string QueryMergeDate { get { return FDLAccount.QueryMergeDate; } }
        public override string QueryDeletePrevious { get { return FDLAccount.QueryDeletePrevious; } }
        public override string QueryExcel { get { return FDLAccount.QueryExcel; } }
        public override string TableTemp { get { return "FDLAccountTemp"; } }
        public override Dictionary<string, string> ExcelColumnMappings { get { return FDLAccount.ExcelColumnMappings; } }
        public override string SheetName { get { return "Sheet1"; } }

        public override void PrepareFiles(DateTime scheduledDate, RoutineBase.ICurrentAction currentAction, Dictionary<string, object> parameters)
        {
            Files = Directory.GetFiles(ExcelPath).Where(x => x.EndsWith(".xlsx")).ToList();
        }

        public override void FinishImport(RoutineBase.ICurrentAction currentAction, Dictionary<string, object> parameters)
        {
            
        }
    }
}
